#!/usr/bin/python

import socket, time
import random

DEV_ID = 'abcd'

messages = [
	#"v2/%s/%s/PING//Test notification with a / inside" % (DEV_ID, random.randint(1, 100000000)),
	"v2/%s/%s/RING//+00000000000" % (DEV_ID, random.randint(1, 100000000)),
	"v2/%s/%s/SMS/+00000000000/SMS from Someone - Mobile (+00000000000): Test" % (DEV_ID, random.randint(1, 100000000)),
	"v2/%s/%s/MMS/+00000000000/MMS from Someone - Mobile (+00000000000): Test" % (DEV_ID, random.randint(1, 100000000)),
	"v2/%s/%s/BATTERY/25/Remaining charge: 25%%" % (DEV_ID, random.randint(1, 100000000)),
	"v2/%s/%s/VOICEMAIL//unknown" % (DEV_ID, random.randint(1, 100000000)),
	"v2/%s/%s/USER//unknown" % (DEV_ID, random.randint(1, 100000000)),
]

sock = socket.socket (socket.AF_INET, socket.SOCK_DGRAM)
sock.setsockopt (socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
for msg in messages:
	print "message:", msg
	sock.sendto (msg, ('255.255.255.255.', 10600))
	time.sleep (12)
